package com.itheima.dao;

import com.itheima.entity.Bird;
import org.springframework.stereotype.Repository;

//使用@Repository注解将BirdDaoImpl类标识为Spring中的Bean
@Repository("birdDao1")
public class BirdDaoImpl implements BirdDao{
    public Bird birdDao2;
    public void fly()
    {
        birdDao2=new Bird();
        this.birdDao2.setWuya("乌鸦");
        this.birdDao2.setFenghuang("凤凰");
        System.out.println("今天天空飞来一群鸟");
        System.out.println("有2只"+this.birdDao2.getWuya()+"，"+"2只"+this.birdDao2.getFenghuang()+"。");
        System.out.print(this.birdDao2.getWuya()+"飞，"+this.birdDao2.getFenghuang()+"飞。");
    }
}
